<?php
include "include/config.inc.php";
if(!isset($_SESSION['s_activId']))
{
  header('location:checkLogin.php');
}
$masterArray = array();
$i=0;

$select = "SELECT transMasterId,voucherType,DATE_FORMAT(transDate,'%d-%m-%Y') AS transDate,voucherNo
             FROM transmaster
         ORDER BY voucherType";
$selectRes = mysql_query($select);
while($row = mysql_fetch_array($selectRes))
{
	$masterArray[$i]['transMasterId'] = $row['transMasterId'];
	$masterArray[$i]['voucherType']   = $row['voucherType'];
	$masterArray[$i]['transDate']     = $row['transDate'];
	$masterArray[$i]['voucherNo']     = $row['voucherNo'];
	$i++;
}
include("bottom.php");
$smarty->assign('masterArray',$masterArray);  
$smarty->display('voucherList.tpl');  
?>